<include file='Admin/Tpl/Public/nav.html' />
<link rel="stylesheet" href="__PUBLIC__/Css/pagestyle.css">  
<div class="page-content">
    <div class="container-fluid">
    	<br/>
        <ol class="breadcrumb default square rsaquo sm">
            <li><a href="index.html"><i class="fa fa-home"></i></a></li>
            <li><a href="#fakelink">Teamin</a></li>
            <li class="active"> 类型管理 </li>
        </ol>
        <div class="btn-group groups">
            <a href="__URL__/add_category" class="btn btn-success"><i class="fa fa-plus"></i>创建会议类型</a>
        </div>
        <div class="the-box no-border">
            <div class="table-responsive div1 div_search">
                <table class="table table-th-block table-hover">
                    <thead>
                    <tr style="text-align:center">
                        <td style="text-align:center;width:60px">编号</td>
                        <td style="text-align:center">类型名称</td>
                        <td style="text-align:center;">子类</td>
                        <td style="text-align:center;width:180px">操作</td>
                      </tr>
                    </thead>
                    <tbody>
                    <tbody>
                    <volist name="rs.data" id="val"> 
                      <tr>                    
                        <td style='text-align:center;vertical-align:middle'>{$val.category_id}</td>
                        <td style='text-align:center;vertical-align:middle'>{$val.category_name}</td>
                        <td style='text-align:center;vertical-align:middle'>
                            <if condition="$val.pid != ''">
                                <table border="1" width="100%">
                                <volist name="val.pid" id="val1">
                                    <tr>
                                        <td>{$val1.category_id}</td>
                                        <td>{$val1.category_name}</td>
                                        <td style='text-align:center;vertical-align:middle'>
                                            <!-- <a href='javascript:void(0)' onclick="alert('开发中')" title='Edit'>修改</a>&nbsp;|&nbsp;
                                            <a href='javascript:void(0)' onclick="alert('开发中')" title='Delete'>删除</a> -->
                                            <span class="save"><a href='javascript:void(0)' onclick="category_act_to_update1({$val1.category_id})" title='Edit'>修改</a></span>|
                                            <span class="delete"><a href='javascript:void(0)' onclick='del_category_act({$val1.category_id})' title='Delete'>删除</a></span>
                                        </td>
                                    </tr>
                                </volist>
                                </table>
                                <else/>
                                没有子类
                            </if>
                        </td>
                        <td style='text-align:center;vertical-align:middle'>
                            <!-- <a href='javascript:void(0)' onclick="alert('开发中')" title='Edit'>修改</a>&nbsp;|&nbsp;
                            <a href='javascript:void(0)' onclick="alert('开发中')" title='Delete'>删除</a> -->
                            <span class="save"><a href='javascript:void(0)' onclick="category_act_to_update1({$val.category_id})" title='Edit'>修改</a></span>|
                            <span class="delete"><a href='javascript:void(0)' onclick='del_category_act({$val.category_id})' title='Delete'>删除</a></span>
                        </td>
                      </tr>
                    </volist>
                    </tbody>
                </table>
                <ul class="pagination success">{$rs.show}</ul>
            </div>
            <div class="table-responsive" id="hl"></div>
        </div>
    </div>
</div>
</div>


</body>
</html>
<script src="__PUBLIC__/assets/js/jquery.min.js"></script>
<script type="text/javascript">
$(".current").css({background:"#8CC152",color:"white"});
function del_category_act(a){
	if(confirm("确认删除?")){
		$.get('__URL__/del_category_act?category_id='+a,'',function(){window.location='__SELF__';},'json');	
	}
}
function category_act_to_update1(a){
	window.location='__URL__/to_update_category_act?category_id='+a;
}

</script>
